# -*- coding: utf-8 -*-
# @Time    : 2021/4/22
# @File    : gif.py
import os
import imageio

if __name__ == "__main__":
	path = f'./images/outputs/udnie-training/'
	gif_name = path + 'the_gif.gif'
	images = [path + img for img in os.listdir(path)]
	frames = [imageio.imread(img) for img in images]
	imageio.mimsave(gif_name, frames, 'GIF', duration=0.6)
	print('done')
